package com.ld.collegetask.serverInterface;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface RequestSerives {

    //登录
    @POST("app/member-login.jspx")
    @FormUrlEncoded
    Call<String> member_login(@Field("username") String username,
                              @Field("password") String password
    );

    //订单列表_包含各种状态
    @POST("app/order-member-list.jspx")
    @FormUrlEncoded
    Call<String> order_member_list(@Field("orderclassId") Integer orderclassId,
                                   @Field("schoolId") Integer schoolId,
                                   @Field("status") Integer status,
                                   @Field("userId") Integer userId,
                                   @Field("receiveUserId") Integer receiveUserId,
                                   @Field("pageNo") Integer pageNo
    );

    //首页订单列表
    @POST("app/order-list.jspx")
    @FormUrlEncoded
    Call<String> order_list(@Field("orderclassId") Integer orderclassId,
                            @Field("schoolId") Integer schoolId,
                            @Field("status") Integer status,
                            @Field("userId") Integer userId,
                            @Field("receiveUserId") Integer receiveUserId,
                            @Field("pageNo") Integer pageNo
    );

    //用户新增地址
    @POST("app/address-member-save.jspx")
    @FormUrlEncoded
    Call<String> address_member_save(@Field("userId") Integer userId,
                                     @Field("address") String address
    );

    //首页广告列表
    @POST("app/advertisement-member-list.jspx")
    @FormUrlEncoded
    Call<String> advertisement_member(@Field("schoolId") Integer schoolId);

    //首页订单查询
    @POST("app/order-member-info.jspx")
    @FormUrlEncoded
    Call<String> order_member_info(@Field("orderId") Integer orderId
    );

    //用户订单接单完成
    @POST("app/order-member-save.jspx")
    @FormUrlEncoded
    Call<String> order_member_save(@Field("userId") Integer userId,
                                   @Field("genderlimit") Integer genderlimit,
                                   @Field("orderclassId") Integer orderclassId,
                                   @Field("discountreleaseId") Integer discountreleaseId,
                                   @Field("endaddress") String endaddress,
                                   @Field("realname") String realname,
                                   @Field("ophone") String ophone,
                                   @Field("oremark") String oremark,
                                   @Field("ocost") String ocost,
                                   @Field("ocommission") String ocommission,
                                   @Field("olife") String olife
    );

    //用户订单接单
    @POST("app/order-member-receive.jspx")
    @FormUrlEncoded
    Call<String> order_member_receive(@Field("orderId") Integer orderId,
                                      @Field("userId") Integer userId
    );

    //用户订单接单完成
    @POST("app/order-member-complete.jspx")
    @FormUrlEncoded
    Call<String> order_member_complete(@Field("orderId") Integer orderId,
                                       @Field("userId") Integer userId
    );

    //用户订单接单确认
    @POST("app/order-member-confirm.jspx")
    @FormUrlEncoded
    Call<String> order_member_confirm(@Field("orderId") Integer orderId,
                                      @Field("userId") Integer userId
    );

    //说说列表
    @POST("app/dynamic-member-list.jspx")
    @FormUrlEncoded
    Call<String> dynamic_member_list(@Field("userId") Integer userId,
                                     @Field("schoolId") Integer schoolId,
                                     @Field("pageNo") Integer pageNo
    );


    //说说详情
    @POST("app/dynamic-member-info.jspx")
    @FormUrlEncoded
    Call<String> dynamic_member_info(@Field("dynamicId") Integer dynamicId,
                                     @Field("userId") Integer userId
    );

    //说说详情
    @POST("app/dynamic-member-comment-list.jspx")
    @FormUrlEncoded
    Call<String> dynamic_member_comment_list(@Field("dynamicId") Integer dynamicId,
                                             @Field("pageNo") Integer pageNo
    );

    //说说保存
    @POST("app/dynamic-member-save.jspx")
    @FormUrlEncoded
    Call<String> dynamic_member_save(@Field("userId") Integer userId,
                                     @Field("dcontent") String dcontent,
                                     @Field("dphotos") String dphotos
    );

    //图片上传
    @Multipart
    @POST("app/dynamic-upload-img.jspx")
    Call<ResponseBody> dynamic_upload_img(@Part() MultipartBody.Part file);

    //说说回复
    @POST("app/dynamic-member-reply.jspx")
    @FormUrlEncoded
    Call<String> dynamic_member_reply(@Field("dynamicId") Integer dynamicId,
                                      @Field("comment") String comment
    );

    //说说评论
    @POST("app/dynamiccomment-member-save.jspx")
    @FormUrlEncoded
    Call<String> dynamiccomment_member_save(@Field("userId") Integer userId,
                                            @Field("dynamicId") Integer dynamicId,
                                            @Field("appointUserId") Integer appointUserId,
                                            @Field("comment") String comment
    );

    //身份证信息详情
    @POST("app/member-validate-identity.jspx")
    @FormUrlEncoded
    Call<String> member_validate_identity(@Field("userId") Integer userId,
                                         @Field("realname") String realname,
                                         @Field("identitycardnumber") String identitycardnumber,
                                         @Field("identitycardobverseimg") String identitycardobverseimg,
                                         @Field("identitycardreverseimg") String identitycardreverseimg
    );

    //身份证图片
    @Multipart
    @POST("app/member-validate-img.jspx")
    Call<ResponseBody> member_validate_img(@Part() MultipartBody.Part file);

    //用户投诉
    @POST("app/order-complaint-member-save.jspx")
    @FormUrlEncoded
    Call<String> complaint_member_save(@Field("userId") Integer userId,
                                       @Field("orderId") Integer orderId,
                                       @Field("ccontent") String ccontent
    );

    //用户取消订单
    @POST("app/order-member-cancel.jspx")
    @FormUrlEncoded
    Call<String> order_member_cancel(@Field("orderId") Integer orderId,
                                       @Field("userId") Integer userId,
                                       @Field("flag") Integer flag
    );

    //头像图片上传
    @Multipart
    @POST("app/member-register-user-img.jspx")
    Call<ResponseBody> member_register_user_img(
            @Part("userId") RequestBody userId,
            @Part() MultipartBody.Part file);

    //消息列表
    @POST("app/member-tidings-list.jspx")
    @FormUrlEncoded
    Call<String> message_member_list(@Field("userId") Integer userId,
                                     @Field("schoolId") Integer schoolId,
                                     @Field("pageNo") Integer pageNo
    );

    //消息详情
    @POST("app/member-tidings-info.jspx")
    @FormUrlEncoded
    Call<String> message_member_info(@Field("tidingsId") Integer tidingsId
    );

    //删除消息
    @POST("app/member-tidings-delete.jspx")
    @FormUrlEncoded
    Call<String> message_member_delete(@Field("tidingsId") Integer tidingsId
    );


    //会员中心首页
    @POST("app/member-info.jspx")
    @FormUrlEncoded
    Call<String> member_info(@Field("userId") Integer userId
    );

    //会员注册，获取验证码
    @POST("app/member-username-code.jspx")
    @FormUrlEncoded
    Call<String> member_username_code(@Field("username") String username
    );

    //忘记密码，获取验证码
    @POST("app/member-forget-password-find-user.jspx")
    @FormUrlEncoded
    Call<String> member_forget_password_find_user(@Field("username") String username
    );

    //会员注册，验证验证码
    @POST("app/member-username-unique.jspx")
    @FormUrlEncoded
    Call<String> member_username_unique(@Field("username") String username,
                                        @Field("code") String code
    );

    //注册账号
    @POST("app/member-register-user.jspx")
    @FormUrlEncoded
    Call<String> member_register_user(@Field("username") String username,
                                      @Field("password") String password,
                                      @Field("schoolId") Integer schoolId,
                                      @Field("realname") String realname,
                                      @Field("gender") Integer gender,
                                      @Field("birthday") String birthday
    );

    //会员注册，更新用户个人信息
    @POST("app/member-register-user-ext.jspx")
    @FormUrlEncoded
    Call<String> member_register_user_ext(@Field("userId") Integer userId,
                                          @Field("realname") String realname,
                                          @Field("gender") Integer gender,
                                          @Field("birthday") String birthday
    );

    //会员注册，更新用户个人头像
    @POST("app/member-register-user-img.jspx")
    @FormUrlEncoded
    Call<String> member_register_user_(@Field("userId") Integer userId,
                                       @Field("userimg") String realname
    );

    //会员中心修改密码-改变
    @POST("app/member-change-password.jspx")
    @FormUrlEncoded
    Call<String> member_change_password(@Field("userId") Integer userId,
                                        @Field("password") String password
    );

    //会员中心修改密码--忘记
    @POST("app/member-reset-password.jspx")
    @FormUrlEncoded
    Call<String> member_reset_password(@Field("username") String username,
                                                  @Field("password") String password
    );


    //我的钱包
    @POST("app/member-wallet.jspx")
    @FormUrlEncoded
    Call<String> member_wallet(@Field("userId") Integer userId
    );

    //我的钱包支出记录
    @POST("app/member_wallet-output-list.jspx")
    @FormUrlEncoded
    Call<String> member_wallet_output_list(@Field("userId") Integer userId,
                                           @Field("pageNo") Integer pageNo
    );

    //我的钱包收入记录
    @POST("app/member_wallet-income-list.jspx")
    @FormUrlEncoded
    Call<String> member_wallet_income_list(@Field("userId") Integer userId,
                                           @Field("pageNo") Integer pageNo
    );

    //我的钱包收支记录
    @POST("app/member-wallet-turnover-list.jspx")
    @FormUrlEncoded
    Call<String> member_wallet_turnover_list(@Field("userId") Integer userId,
                                             @Field("pageNo") Integer pageNo
    );

    //会员中心充值记录
    @POST("app/member-charge-list.jspx")
    @FormUrlEncoded
    Call<String> member_charge_list(@Field("userId") Integer userId,
                                    @Field("pageNo") Integer pageNo
    );

    //会员中心充值记录
    @POST("app/member-charge-apply.jspx")
    @FormUrlEncoded
    Call<String> member_charge_apply(@Field("userId") Integer userId,
                                     @Field("amount") String pageNo
    );

    //会员中心提现记录
    @POST("app/member-cash-list.jspx")
    @FormUrlEncoded
    Call<String> member_cash_list(@Field("userId") Integer userId,
                                  @Field("pageNo") Integer pageNo
    );

    //会员中心提现申请，余额查询
    @POST("app/member-cash-query.jspx")
    @FormUrlEncoded
    Call<String> member_cash_query(@Field("userId") Integer userId
    );

    //会员中心提现申请，余额查询
    @POST("app/member-cash-apply.jspx")
    @FormUrlEncoded
    Call<String> member_cash_apply(@Field("userId") Integer userId,
                                   @Field("pay") String pay,
                                   @Field("code") String code
    );

    //发单优惠券
    @POST("app/discount-release-member-list.jspx")
    @FormUrlEncoded
    Call<String> discount_release_member_list(@Field("userId") Integer userId,
                                              @Field("status") Integer status,
                                              @Field("pageNo") Integer pageNo
    );

    //会员中心用户地址
    @POST("app/address-member-list.jspx")
    @FormUrlEncoded
    Call<String> address_member_list(@Field("userId") Integer userId,
                                     @Field("pageNo") Integer pageNo
    );

    //会员中心用户地址
    @POST("app/address-member-delete.jspx")
    @FormUrlEncoded
    Call<String> address_member_delete(@Field("addressId") Integer addressId
    );

    //会员中心用户地址
    @POST("app/address-member-isdefault.jspx")
    @FormUrlEncoded
    Call<String> address_member_isdefault(@Field("addressId") Integer addressId
    );

    /***
     * 基础数据
     * */
    //获取学校列表
    @POST("app/school-member-list.jspx")
    @FormUrlEncoded
    Call<String> school_member_list(@Field("pageNo") Integer pageNo
    );

    //获取订单分类列表
    @POST("app/order-class-member-list.jspx")
    Call<String> order_class_member_list(
    );
}
